import { Column, Entity } from "typeorm";
import { BaseEntity } from "../../base/entity/base";


export enum ProviderStatus {
    /**
     * 正常
     */
    NORMAL = 3,
    /**
     * 禁用
     */
    DISABLED = 4,
}

@Entity('provider_info', { comment: '服务人员登录信息' })
export class ProviderInfoEntity extends BaseEntity {
    @Column({ comment: '手机号', length: 255, unique: true })
    phone: string;

    @Column({ comment: 'IP地址', length: 255, nullable: true })
    ip: string;

    @Column({ comment: '服务人员状态', type: 'enum', enum: ProviderStatus, default: ProviderStatus.NORMAL })
    status: ProviderStatus;
}